fix(cli, api): tolerate unrecognised model config and dataset flag values - #452
Merged
Merged
Conversation
…lues A dataset using an attribution method, model version, extraction flag or dataset flag the CLI didn't recognise made GET /api/v1/datasets fail to deserialize. That endpoint returns every dataset on the tenant, so a single such dataset broke `re get datasets`, `re prune`, `re get custom-label-trend-report` and `re package upload` -- even when the dataset being operated on was unaffected. Adds the missing values and gives each of the four enums an Unknown fallback, so later platform additions are preserved as-is rather than rejected and still round-trip unchanged through `re package upload`. Also fixes wait_for_dataset_to_exist computing its deadline backwards, which made --dataset-creation-timeout a no-op and left the poll loop unbounded. RE-12983 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The GitHub runners have moved to Rust 1.97, where clippy::useless_borrows_in_formatting flags a redundant `&` on a format! argument. Both crates set `#![deny(clippy::all)]`, so this fails the clippy job on master and on every open PR. Neither line is new -- the one in api/src/lib.rs dates from 2021 -- they simply weren't linted until the toolchain bump. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A dataset using an attribution method, model version, extraction flag or dataset flag this CLI didn't recognise made
GET /api/v1/datasetsfail to parse. Because that endpoint returns every dataset on the tenant, a single such dataset brokere get datasets,re prune,re get custom-label-trend-reportandre package upload— even when the dataset being operated on was unaffected.Reported by a customer whose
re package uploadfailed ontable_formatted_word_ids. Agenerative_extractiondataset flag turned out to reproduce it independently, with no IXP config involved at all.table_formatted_word_ids,gemini_3_1_flash_lite_preview, and theconversational_filters/generative_extraction/generative_prelabelling/llm_assisted_labellingdataset flags.Unknownfallback so later platform additions are preserved as-is rather than rejected, and still round-trip unchanged throughre package upload. This uses per-variant#[serde(untagged)], hence the serde floor moving to 1.0.164.wait_for_dataset_to_existcomputing its deadline backwards —start_time - Instant::now()saturates to zero, so--dataset-creation-timeoutwas a no-op and the loop never terminated.Breaking change to the
reinfer-clientAPI: the four enums gain a variant and three are no longerCopy, so this wants a minor version bump.Not in scope, worth follow-ups:
ModelConfig'skindtag still has noUnknownfallback, and--dataset-creation-timeouthas no hard wall-clock bound (each poll makes retrying HTTP calls).RE-12983